home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1999 January - Disc 2 / Macworld (1999-01) (Disk 2).dmg / Serious Demos / Symbolic Composer 4.2 / Environment / System / DEF / Utilities / Array Primitives / putv < prev   
Lisp/Scheme  |  1998-10-23  |  255b  |  17 lines

  1. putv vector position value
  2.  
  3. This puts a value to a vector to the position.
  4.  
  5. (setq vector (make-array 10))
  6. --> #(nil nil nil nil nil nil nil nil nil nil)
  7.  
  8. (putv vector 0 1)
  9. --> 1
  10.  
  11. (aref vector 0)
  12. --> 1
  13.  
  14. vector
  15. --> #(1 nil nil nil nil nil nil nil nil nil)
  16.  
  17.